﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Controls="clr-namespace:WindowsPhoneToolbox.Controls"
             xmlns:res="clr-namespace:WindowsPhoneToolbox"
             x:Class="WindowsPhoneToolbox.Controls.WindowsPhoneControl"
             mc:Ignorable="d" Focusable="True"
             d:DesignHeight="1900" d:DesignWidth="350" 
             x:Name="WindowsPhoneToolWindow">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="40"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Menu Height="45" x:Name="menu" BorderThickness="0,0,0,1" BorderBrush="#FF5E5E5E" UseLayoutRounding="True">
            <Menu.Background>
                <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                    <GradientStop Color="#FFF6F6F6"/>
                    <GradientStop Color="#FF4B7CCE"/>
                    <GradientStop Offset="0.996"/>
                </LinearGradientBrush>
            </Menu.Background>
            <Menu.Foreground>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="Black" Offset="0"/>
                    <GradientStop Color="White" Offset="1"/>
                </LinearGradientBrush>
            </Menu.Foreground>
            <MenuItem x:Name="AboutMenu" Width="32" Height="32" Margin="3,3,0,0" ToolTip="{Binding Source={x:Static res:Resources.XAbout}}" Click="AboutMenuClick">
                <MenuItem.Icon>
                    <Image Source="/WindowsPhoneToolbox;component/Resources/About.ico" Margin="0,1,0,0" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem x:Name="ConnectMenu" Width="32" Height="32" Margin="5,3,0,0" ToolTip="{Binding Source={x:Static res:Resources.XConnect}}" Click="ConnectMenuClick">
                <MenuItem.Icon>
                    <Image Source="/WindowsPhoneToolbox;component/Resources/Connect.ico" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem x:Name="PhoAppsMenu" Width="32" Height="32" Margin="5,3,0,0" ToolTip="{Binding Source={x:Static res:Resources.XShowApp}}" Click="PhoAppsMenuClick" IsEnabled="{Binding IsConnected, ElementName=PanelConnect, Mode=OneWay}" Effect="{Binding MenuEfect, ElementName=PanelConnect, Mode=OneWay}">
                <MenuItem.Icon>
                    <Image Source="/WindowsPhoneToolbox;component/Resources/AppCore.ico" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem x:Name="XapDeployMenu" Width="32" Height="32" Margin="5,3,0,0" ToolTip="{Binding Source={x:Static res:Resources.XDeploy}}" Click="XapDeployMenuClick" IsEnabled="{Binding IsConnected, ElementName=PanelConnect, Mode=OneWay}" Effect="{Binding MenuEfect, ElementName=PanelConnect, Mode=OneWay}">
                <MenuItem.Icon>
                    <Image Source="/WindowsPhoneToolbox;component/Resources/XapDeploy.ico"/>
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem x:Name="ManifestEdit" Width="32" Height="32" Margin="5,3,0,0" ToolTip="Editor Windows Phone Manifest" Click="ManifestEditClick" IsEnabled="{Binding HasSolution, ElementName=PanelEditManifest, Mode=OneWay}" Effect="{Binding MenuEfect, ElementName=PanelEditManifest, Mode=OneWay}">
                <MenuItem.Icon>
                    <Image Source="/WindowsPhoneToolbox;component/Resources/ManifestEdit.ico"/>
                </MenuItem.Icon>
            </MenuItem>
        </Menu>
        <ScrollViewer x:Name="ScrollViewerControl" VerticalScrollBarVisibility="Auto" Grid.Row="1">
            <StackPanel Orientation="Vertical">
                <Grid x:Name="gridbuild" Height="45" Margin="0"  >
                    <Grid.Background>
                        <SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ControlDarkColorKey}}"/>
                    </Grid.Background>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="40"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Image x:Name="imageBuild" Stretch="None" Source="/WindowsPhoneToolbox;component/Resources/Build.ico" Grid.RowSpan="2" />
                    <ProgressBar x:Name="BuildProgressBar" Minimum="0" Maximum="1" Value="0.0" Height="14" 
            	Margin="7,0,7,5" Grid.Column="1" Grid.Row="1" VerticalAlignment="Stretch" />
                    <TextBlock x:Name="barText" FontSize="12" Text="Build..." Grid.Column="1" Margin="7,7,0,0" FontWeight="Bold" VerticalAlignment="Center" ClipToBounds="True" TextTrimming="CharacterEllipsis" />
                </Grid>
                <Grid x:Name="gridCell">
                    <Grid.Background>
                        <SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ControlDarkColorKey}}"/>
                    </Grid.Background>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="40"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Image x:Name="imagePhone" Stretch="None" Source="/WindowsPhoneToolbox;component/Resources/Emulator.ico" Grid.RowSpan="3" />
                    <TextBlock x:Name="CelPhoneMsg"  Text="{Binding Status, ElementName=PanelConnect}" Margin="5,0,0,0" Grid.Column="1" VerticalAlignment="Center" FontWeight="Bold" FontSize="12" />
                    <TextBlock x:Name="CelPhoneManufature" Text="{Binding PhoneManufature, ElementName=PanelConnect}" Margin="5,0,0,0" FontWeight="Bold" Grid.Row="1" Grid.Column="1" FontSize="12" />
                    <TextBlock x:Name="CelPhoneVersion" Text="{Binding PhoneVersion, ElementName=PanelConnect}" Margin="5,0,0,0" FontWeight="Bold" Grid.Row="2" Grid.Column="1" FontSize="12" />
                </Grid>
                <StackPanel Orientation="Vertical">
                    <Controls:AppEmulatorControl x:Name="PanelAppsInst" Margin="7,5,7,0" TitleExpand="{Binding Source={x:Static res:Resources.XInstalledApplication}}" 
                                        Note="{Binding Source={x:Static res:Resources.XNoteGuid}}"  Expanded="True" ActionCommand="PanelActionCommand" />
                    <Controls:AppEmulatorControl x:Name="PanelAppsCore" Note="" TitleExpand="{Binding Source={x:Static res:Resources.XPhoneApplications}}" Margin="7,5,7,0"  Expanded="False" ActionCommand="PanelActionCommand" />
                    <Controls:AppEmulatorControl x:Name="PanelPhoneSettings" Note="" TitleExpand="{Binding Source={x:Static res:Resources.XPhoneSettings}}" Margin="7,5,7,0"  Expanded="False" ActionCommand="PanelActionCommand" />
                    <Controls:XapDeployControl x:Name="PanelDeploy" Margin="7,5,7,0" UploadCommand="PanelDeployUploadCommand" />
                    <Controls:ConnectDeviceControl Margin="7,5,7,0" x:Name="PanelConnect" ConnectCommand="PanelConnectConnectCommand" />
                    <Controls:ExplorerPhoneControl x:Name="PanelExplorer" Margin="7,5,7,0" IsoExplorerCommand="PanelExplorerCommand" />
                    <Controls:EditManifestControl x:Name="PanelEditManifest" Margin="7,5,7,0" />
                    <Controls:WelcomeControl x:Name="Welcome" Margin="7,5,7,0" />
                </StackPanel>
            </StackPanel>
        </ScrollViewer>
    </Grid>
</UserControl>